package org.blogwu.learn.multithread.chapter3.demo6.v1;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

public class Main {

    static ReentrantReadWriteLock readWriteLock = new ReentrantReadWriteLock();
    static Lock readLock = readWriteLock.readLock();
    static Lock writeLock = readWriteLock.writeLock();


    public static void main(String[] args) {
        ReadThread r1 = new ReadThread(0);
        ReadThread w1 = new ReadThread(1);
        r1.start();
        w1.start();
    }
}
